<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script type="text/javascript" src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
        <script type="text/javascript" src="__STATIC__/admin/js/jquery-2.1.0.min.js"></script>
        <link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/app.css" />
        <style type="text/css">  
            <!--
            .pagelist {padding:10px 0; text-align:center;}
            .pagelist span,.pagelist a{ border-radius:3px; border:1px solid #dfdfdf;display:inline-block; padding:5px 12px;}
            .pagelist a{ margin:0 3px;}
            .pagelist span.current{ background:#09F; color:#FFF; border-color:#09F; margin:0 2px;}
            .pagelist a:hover{background:#09F; color:#FFF; border-color:#09F; }
            .pagelist label{ padding-left:15px; color:#999;}
            .pagelist label b{color:red; font-weight:normal; margin:0 3px;}
            .pagelist ul{overflow:hidden;text-align: center}
            .pagelist li{list-style: none;display:inline}
            html{
                height:100%;
                margin:0;
            }
            .text{
                text-align:center;
                text-align:right;
            }
            body{width:950px;margin:0px auto}
            #box{
                width:950px;
            }
            #left{
                width:150px;
                height:150px;
                background-color:blue;
                border:1px dotted;
                float:left;
            }
            #main{
                width:150px;
                height:152px;
                background-color:red;
                border:1px dotted;
            float:left

            }
            #right{
                width:150px;
                height:150px;

                border:1px dotted;
            float:left
            -->
        </style>
    </head>
    <body>
        <script type="text/javascript" src="__STATIC__/admin/cs-js/selected.js"></script>
        <script type="text/javascript">
            function stockAction(pid, type){
                window.location.href = "/index/product/stockItem?pid="+pid+"&type="+type;
            }
        </script>
        <div id="box" style="margin-top:60px">
            <h2 style="text-align: center">商品列表</h2>
            <div style="clear:both;margin-top:0px">
                <form method="post" id="searchProduct" action="stockIndex">
                    一级分类：<select class="cascade_drop_down" id="preclass" name="preid" style="width: 120px;height: 25px" ></select>
                    二级分类：<select class="" id="subclass" name="subid" style="width: 120px;height: 25px" ></select>
                    关键字：<input type="text" name="key" style="width: 150px; height: 20px"/>
                    <button type="submit">&nbsp;&nbsp;搜索&nbsp;&nbsp;</button>
                </form>
            </div>
        <div>
            <table border="1" cellspacing="0" cellpadding="0" style="text-align:center;margin-top:15px">
                    <tr bgcolor="#88C1C8" style="height: 30px">
                        <th width='40px'>编号</th>
                        <th width='130px'>名称</th>
                        <th width='100px'>分类</th>
                        <th width='130px'>条形码</th>
                        <th width='70px'>计量单位</th>
                        <th width='70px'>仓库库存</th>
                        <th width='70px'>货架库存</th>
                        <th width='120px'>备注</th>
                        <th colspan="2" width='200px'>操作</th>
                    </tr>
                    {if isset($products)}
                    {volist name="products" id="vo"}
                        <tr style="height: 40px">
                            <td id="{$vo.pid}">{$vo.pid}</td>
                            <td>{$vo.pname}</td>
                            <td>{$vo.cname}</td>
                            <td>{$vo.barcode}</td>
                            <td>{$vo.unit}</td>
                            <td>{$vo.w_stock}</td>
                            <td>{$vo.s_stock}</td>
                            <td>{$vo.remarks}</td>
                            <td width='100px'>
                                <input type="button" class="btn btn-primary radius" onclick="stockAction({$vo.pid},1)" value="&nbsp;&nbsp;入库&nbsp;&nbsp;"/>
                            </td>
                            <td>
                                <input type="button" class="btn btn-primary radius" onclick="stockAction({$vo.pid},2)" value="&nbsp;&nbsp;出库&nbsp;&nbsp;"/>
                            </td>
                        </tr>
                    {/volist}
                    {else /}
                    <tr style="height: 40px"><td colspan="10">没有数据</td></tr>
                    {/if}
            </table>
            <div class="pagelist">{$page}</div>
        </div>
        </div>
    </body>
</html>
